function plugin (Vue) {
  if (plugin.installed) {
    return
  }
  !Vue.prototype.$hasPermission && Object.defineProperties(Vue.prototype, {
    $hasPermission: {
      get () {
        const _this = this
        return (permissionList = []) => {
          const authoriList = _this.$store.getters && (_this.$store.getters.permissionTags || [])
          return authoriList.some(up => { return permissionList.includes(up) })
        }
      }
    }
  })
}

export default plugin
